@charset "utf-8";
@import './variables.scss';
@import './function.scss';

// 字体颜色方法rgba
// 红色系
@mixin error_color($level: 6) {
    color: genColor($color-basic-error, $level);
}
// 绿色系
@mixin success_color($level: 6) {
    color: genColor($color-basic-success, $level);
}
// 橘色系
@mixin warning_color($level: 6) {
    color: genColor($color-basic-warning, $level);
}
// 黑色系
@mixin grey_color($level: 6) {
    color: getAlpha(#000000, $level);
}

// 超出多少行后隐藏
@mixin ellipsisLine($line: 2) {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: $line;
    overflow: hidden;
    text-overflow: ellipsis;
}
@mixin ellipsis() {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/*-------------------字体颜色方法rgba-------------------*/
/*蓝色系*/
@mixin primary_color($level: 6) {
    /*通过该函数获取主色不同等级变色*/
    color: genColor($primary-color, $level);
}

/*红色系*/
@mixin error_color($level: 6) {
    color: genColor($error-color, $level);
}

/*绿色系*/
@mixin success_color($level: 6) {
    color: genColor($success-color, $level);
}

/*黄色系*/
@mixin warning_color($level: 6) {
    color: genColor($warning-color, $level);
}

/*黑色系*/
@mixin grey_color($level: 6) {
    color: getAlpha(#000000, $level);
}

/*-------------------背景色-------------------*/
/*蓝色系*/
@mixin primary_bg_color($level: 6) {
    /*通过该函数获取主色不同等级变色*/
    background-color: genColor($primary-color, $level);
}

/*红色系*/
@mixin error_bg_color($level: 6, $alpha: 1) {
    background-color: color2Rgba(genColor($error-color, $level), $alpha);
}

/*绿色系*/
@mixin success_bg_color($level: 6, $alpha: 1) {
    background-color: color2Rgba(genColor($success-color, $level), $alpha);
}

/*黄色系*/
@mixin warning_bg_color($level: 6, $alpha: 1) {
    background-color: color2Rgba(genColor($warning-color, $level), $alpha);
}

/*黑色系*/
@mixin grey_bg_color($level: 1) {
    background-color: getAlpha(#000000, $level);
}

/*-------------------边框色-------------------*/
/*蓝色系*/
@mixin primary_border_color($level: 6) {
    /*通过该函数获取主色不同等级变色*/
    border-color: genColor($primary-color, $level);
}

/*红色系*/
@mixin error_bd_color($level: 6) {
    border-color: genColor($error-color, $level);
}

/*绿色系*/
@mixin success_bd_color($level: 6) {
    border-color: genColor($success-color, $level);
}

/*黄色系*/
@mixin warning_bd_color($level: 6) {
    border-color: genColor($warning-color, $level);
}

/*黑色系*/
@mixin grey_bd_color($level: 1) {
    border-color: getAlpha(#000000, $level);
}

@mixin filter-drop-shadow() {
    padding: 14px;
    vertical-align: top;
    filter: drop-shadow(-14px -14px 0px get_color_base);
    -webkit-filter: drop-shadow(-14px -14px 0px $primary-color);
}

// 超出多少行后隐藏
@mixin ellipsisLine($line: 2) {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: $line;
    overflow: hidden;
    text-overflow: ellipsis;
}
@mixin ellipsis() {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@mixin unselectable {
    -webkit-user-select: none; /* Safari 3.1+ */
    -moz-user-select: none; /* Firefox 2+ */
    -ms-user-select: none; /* IE 10+ */
    user-select: none; /* 标准语法 */
}
